# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.
#
# Originally from: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=python-httpx-ntlm

pkgname=python-httpx-ntlm
_pkgname=httpx-ntlm
pkgver=1.4.0
pkgrel=1
pkgdesc='NTLM authentication support for HTTPX.'
arch=('any')
url='https://github.com/ulodciv/httpx-ntlm'
license=('ISC')
depends=('python')
makedepends=('python-build' 'python-installer' 'python-wheel'
             'python-setuptools')
source=("https://github.com/ulodciv/httpx-ntlm/archive/refs/tags/$pkgver.tar.gz")
sha512sums=('32d6705588de4142e7f357214733da6d4a3a5ba1dff83aec93bd584a12745308d11d15268e36361d6a9d3f1d8114acffa5f7cf44c27d91dcf03911ae03871b59')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --no-isolation
}

package() {
  cd "$_pkgname-$pkgver"

  python -m installer --destdir="$pkgdir" dist/*.whl

  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

